#!/bin/bash

#####################################
#
# Copyright 2017-2018 NXP
#
#####################################

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/edgescale/bin
DESC="edgescale service"
NAME="edgescale"
STARTUP="/usr/local/edgescale/bin/startup.sh"

case "$1" in
start)
        $STARTUP &
        ;;

stop)
        killall -9 kubelet
        killall -9 mq-agent
        ;;

restart)
        $0 stop
        $0 start
        ;;

*)      echo "Usage: /etc/init.d/edgescale {start|stop|restart}"
        exit 2
esac
exit 0
